package ro.mvc.web.controller;

import ro.mvc.framework.action.Action;
import ro.mvc.framework.action.GenericAction;

import javax.servlet.http.*;
import java.io.PrintWriter;

/**
 * Created by IntelliJ IDEA.
 * User: marina.ciocea
 * Date: 27.07.2010
 * Time: 15:51:51
 * To change this template use File | Settings | File Templates.
 */
public class MarinaAction  extends GenericAction {


   // @Override
    public void execute(HttpServletRequest request, HttpServletResponse response) throws Exception
    {
        super.execute(request, response);

         response.setContentType("text/html;charset=UTF-8");
		String firstName=request.getParameter("firstName").toString();
		String lastName=request.getParameter("lastName").toString();
		String telephone=request.getParameter("telephone").toString();
		String address1=request.getParameter("address1").toString();
		String address2=request.getParameter("address2").toString();
		PrintWriter out=response.getWriter();
		out.println("<html>");
		out.println("<head>");
		out.println("<title>Address book</title>");
		out.println("</head>");
		out.println("<body>");
		out.println("<h3><font face=\"Arial\" color=\"green\">Contact successfully added!</font></h3>");
		out.println("<p ><font face=\"Arial\" color=\"green\">First name: 	"+ firstName+" </font></p>");
		out.println("<p ><font face=\"Arial\" color=\"green\">Last name:  	"+ lastName+" </font></p>");
		out.println("<p ><font face=\"Arial\" color=\"green\">Telephone:  	"+ telephone+" </font></p>");
		out.println("<p ><font face=\"Arial\" color=\"green\">Address1:   	"+ address1+" </font></p>");
		out.println("<p ><font face=\"Arial\" color=\"green\">Address2:   	"+ address2+" </font></p>");
		out.println("</body>");
		out.println("</html>");
		out.close();
    }


}
